SG Window
EndDialog Method

©1998 by Stinga

See Also     Overview     Properties     Methods      Events     Constants     Error Codes     How To...     FAQ
Description

Closes and destroys modal dialog box.

Syntax

object.EndDialog result As Long

Part Description
object The object is expression that evaluates to Window object
result Value to be returned to from the DoModal method.

 

Remarks

You must use EndDialog method to destroy modal dialog box created by the DoModal method. EndDialog can be called only from within dialog box message handler. This method is usually called as a response to WM_CLOSE message or Ok/Cancel button click.

EndDialog does not destroy the dialog box immediately. Dialog box is destroyed when message handler returns control to the system.

DoModal topic contains example that shows how to use EndDialog method.